Thursday, 5 June 2014

HOW TO HACK DATABASE ONLINE TUTORIAL PART 1 - BASICS OF DATABASE HACKING

Posted By: Abhishek Anand


Hello friends, welcome to worlds one of the best Ethical Hacking Teaching websites online. Today we will learn basics of Database Hacking, how to hack database online. In this tutorial we will learn what should we know prior to begin database hacking like what is database? Different types of Databases? What is Query? What all things we must know before starting to hack a Database? Most of us have heard things daily in the news that some website is Hacked? 1000's of customers crucial information is leaked. Millions of credit card information stolen by some Hacking Group. What is that? Well that is nothing just Hackers have owned the Database of the Company or website. In layman terms, Database is the heart of any Website. Like our heart pumps in blood in our veins similarly Queries flow though the database to and fro on all requests. Similarly like heart, if we own the database that means we have captured everything because its the database where everything small piece of information is stored. So Hackers only rule should be forget the rest OWN the database.  Lets learn what all things hacker should know or have before hacking any database online.




What Is a Database?

A database is a system of software to store and retrieve information in a structured format. Early databases were flat files, kind of like a big Excel file. As databases got bigger and bigger, this simple structure proved inefficient.

As a result, a scientist at IBM, Dr. Codd, developed a structure that came to be known as the relational database model. It is this model that about 97% of all databases now use, and this includes all the major software companies.

The basics of the relational model is that data should be placed in separate tables with unique keys that link the tables to avoid data duplication and to ease the retrieval of this data.

The Structure of a Database

This relational database model links data from separate tables by using a shared column or "key". The diagram below is of a simple relational database model where all the tables are linked by the column "ID". Structure sample is shown below:



Major Vendors in the Database Market

The enterprise database market has multiple vendors offering products that can accomplish the same task, but in different ways. The major players in this market are:

Oracle : They are the behemoth in this market with nearly 50% market share. They own multiple different database software products, including their namesake and MySQL.

Microsoft SQL Server : Microsoft entered this market in the early '90s by teaming up with Sybase to develop an enterprise database offering. As a result, MS SQL Server and Sybase still share many similarities. Originally, Microsoft was only a player in the small business market, but is slowly gaining traction in the larger enterprise market.

MySQL : This is an open-source database that you will find behind so many web sites, in part, because it's free.

IBM DB2 : IBM was the original enterprise database provider and made many the major developments in database design, but like everything about IBM, it has been in decline in recent decades.

Other major vendors include Sybase, SAS, PostgreSQL (open source), and many others. Generally, like any hack, we need to do good recon to determine the software and version to be successful as most of the database hacks are vendor specific.

Structured Query Language (SQL)

When IBM developed the early databases, they also developed a programming language for managing and manipulation this data. They called it "Structured Query Language" or as it is generally known, SQL.

This is a simple language that uses English words in similar ways that humans who speak English use them. For instance...

SELECT means "select some data from columns in a table"
FROM means "get the data from this table"
WHERE means select the data that meets this condition (lastname = 'Singh').

Furthermore, words such as UPDATE, INSERT, and DROP mean in SQL exactly what you would expect them to mean.

SQL is not picky about syntax, but it is picky about logic. Although best practice is to CAPITALIZE all keywords (SELECT, FROM, WHERE), it's not required. In addition, white space is ignored. All but Microsoft, though, require that a SQL statement to end in a semicolon (;). On Microsoft products, it's optional.

SQL is standardized by ANSI, but this standardization only includes about 80% of the language or the core of SQL. Software publishers are free to add additional commands and features that are not part of the standard. This can sometimes make it difficult to transport SQL code between DBMS. It also makes it critical to do good reconnaissance on the database to know the manufacturer and the version before attacking as the attacks are often specific to the manufacturer and the version.

Each of the DBMS can be used from a command line, but each has its own GUI. Recently, MySQL released a new GUI called Workbench as seen in the previous section.

Oracle, Microsoft, and the others have similar GUIs that allow the administrator to access their systems.

Basic SQL Query

When we need to extract data from the database, it's said that we are "querying" the database. As databases are repositories for data, the ability to extract or query data is among the most important functions. As a hacker, we want to extract data, so the query is critical to getting the goods.

The basic structure of the query looks like this:

SELECT <columns>
FROM <table>
WHERE <conditions>

This statement says "give me the data in the columns listed in the SELECT statement from the table that comes after the FROM keyword but only give me the rows that meet the conditions that come after the WHERE keyword."

So, if we wanted to get first name, last name, username, and password from the staff table for employees with the last name of "Singh" we could construct a statement like this:

SELECT first_name, last_name, username, password
FROM staff
WHERE last_name = 'Singh";

SQL Injection

SQL injection is the most common database attack and is probably responsible for the largest dollar volume of losses from cyber crime and advanced persistent threat (APT).

It basically involves putting SQL commands in the data forms of webpages that connect to a database. These forms then send these SQL commands back to the database and the database will either authenticate the user (yes, authentication is a database function) or give up the target data.

In future tutorials, we will spend quite a bit of time using SQL injection tools and executing SQL injection attacks.


Other Vulnerabilities

Besides showing you how to do SQL injection, we will examine some of the other of vulnerabilities in databases. These involve authentication, using the database to compromising the operating system, and several others.

Now that we having covered the basics things related to databases, in future tutorials I will show you how to hack into these databases, so keep coming back!

If you have any queries ask me in form of comments. 

10 STEP GUIDE TO PREVENT SQL INJECTION

Posted By: Abhishek Anand

Hello Friends, it new year and now lets dedicate this year to Web security and ethics.
Note my point:
" Security doesn't suffers because of Hackers, It suffers because of unaware developers and inappropriate programming techniques".
So friends, let have a resolution this year that we will learn everything and utilize our knowledge only for Good causes and HackingLoops will always be there to help you in fulfilling your resolution.
And accept one bitter truth :
"You can never stop hackers to hack something, you can just make his task harder by putting some extra security"
SQL injection is one of the most common and dangerous security threat in the software and web industry. SQL injection is nothing, just a failure to prevent the applications (web or software) database structure consistent. SQL injections are dangerous because they are a open windows to hackers to enter in your system through your Web interface and perform whatever they like i.e. delete tables, modify databases, exposing your users informations, or even get hold of your corporate network.


Some people say SQL injection is because of web hosting providers weak security system but my dear friends, SQL injection is a programming based issue, and believe me it has nothing to do with Web hosting providers. It's completely a programmatic issue i.e programmer has forgot to handle the strings properly in its application or sometimes doesn't handled the dynamic queries and its variables correctly. ok..ok.. Let me explain this in detail how SQL injection or any other web or application injection attack works?

My first question is that why SQL injection attacks occurs so frequently?
The answer is quite simple, SQL is most popular language for database management and all know, popularity drives risks. More people know the things, more vulnerabilities can be discovered. But this is partially true in case of SQL injection. I can understand sometimes loophole or bug lies with the programming language but most of times its because of lack of sufficient knowledge. When i was a college student, i attended a SQL coaching classes, i appreciate what knowledge they have provided me but its ironical, they never taught me secured programming practices and not a single lecture on how to harden the SQL server and how to fix its loopholes. And i can guarantee its the same case for most of us and programmers or web developers that suffers most are self learners. Always consider the fact 
"Little knowledge is a dangerous thing".

SQL injection risks arise every time when a programmer creates a dynamic database query, which contains or accepts user input. So SQL injection can be prevented by following two things:
1. Avoiding use of dynamic queries.
2. Not allowing user inputs in your queries

Oops! both solution sounds little bit weird isn't it... off  course these solutions sounds ridiculous, as most of queries are dynamic in case of complex websites, and second if you don't allow user input into your queries, efficiency will be hugely affected. Accessing user data will going to take ample amount of time and everybody knows, users don't like to wait... 
So friends lets see the solutions in more technical way, that which 10 steps can protect your website from SQL injection:
 1. Use dynamic SQL if and only if there is no other alternative
 2. Escape user input always
 3. Always assume magic quotes is off
 4. Install security updates and patches regularly
 5. Remove all the dead SQL's or other codes that you don't use
 6. Never display the system defined error message for SQL errors 
 7. Store database credentials in a separate file
 8. Use the principle of least privilege
 9. Disable shells
 10. Use SQL injection Hack tools to check vulnerabilities


Lets discuss these techniques one by one in detail to make our website fire proof against all SQL injection hacking attempts:

1. Use Dynamic SQL queries if and only if there is no other alternative
Dynamic SQL can almost always be replaced with prepared statements, parameterized queries, or stored procedures. For instance, instead of dynamic SQL, in Java you can use PreparedStatement() with bind variables, in .NET you can use parameterized queries, such as SqlCommand() or OleDbCommand() with bind variables, and in PHP you can use PDO with strongly typed parameterized queries (using bindParam()).

In addition to prepared statements, you can use stored procedures. Unlike prepared statements, stored procedures are kept in the database but both require first to define the SQL code, and then to pass parameters.

Parameterized Queries:
SQL Server, like many other database systems, supports a concept called parametrized queries. This is where the SQL Query uses a parameter instead of injecting the values directly into the command. 

Consider the following Query:
string cmdText=string.Format("SELECT * FROM Customers "+
    "WHERE Country='{0}'", countryName);
SqlCommand cmd = new SqlCommand(cmdText, conn);
the same query can easily rewritten using parameters:
 string commandText = "SELECT * FROM Customers "+
    "WHERE Country=@CountryName";
SqlCommand cmd = new SqlCommand(commandText, conn);
cmd.Parameters.Add("@CountryName",countryName);
The value is replaced by a placeholder, the parameter, and then the parameter's value is added to the Parameters collection on the command.

Using Stored Procedures
Stored Procedures add an extra layer of security in to the design of a software or web application. In this case, as long as the interface on the stored procedure stays the same, the table structure can change with no noticeable consequence to the application that is using the database. This layer of abstraction also helps put up an extra barrier to potential attackers. If access to the data in SQL Server is only ever permitted via stored procedures, then permission does not need to be explicitly set on any of the tables. Therefore, none of the tables should ever need to be exposed directly to outside applications. For an outside application to read or modify the database, it must go through stored procedures. Even though some stored procedures, if used incorrectly, could potentially damage the database, but anything that can reduce the risk is beneficial.

Stored procedures can be written to validate any input that is sent to them to ensure the integrity of the data beyond the simple constraints otherwise available on the tables. Parameters can be checked for valid ranges. Information can be cross checked with data in other tables.

2. Escape User Input
The second biggest evil for SQL injections is user input. While you can’t always avoid user input completely, the next best thing is to escape it. Escaping user input doesn’t do as good job as limiting dynamic queries but still it can stop many SQL injection attacks. For instance, if you are using PHP, for GET and POST, use htmlspecialchars() to escape XSS characters and addslashes(), in case you using database. Alternatively, you can escape user input from inside your database but since the exact code varies from one database to the next, you should check with the docs of your database for the exact syntax to use.

3. Always assume magic quotes is turn off
When the magic_quotes_gpc variable is off, this can prevent some (but not all) SQL injection attacks. Unfortunately Magic quotes are not an ultimate defense against SQL injection and but their is much worse - sometimes they are turned off by default and you more worse is that you are not aware about it. This is why it is necessary to have code for the substitution of quotes with slashes. 
Here is the simplest way to turn off magic quotes:
$username = $_POST['username'];
$password = $_POST['password'];
if (!get_magic_quotes_gpc()) {
   $username = addslashes($username);
   $password = addslashes($password);
4. Install security updates and patches regularly
Even if your code doesn't have SQL vulnerabilities, when the database server, the operating system, or the development tools you use can have SQL vulnerabilities, and this is also risky. And everything that can become a risk should be taken care of. This is why you should always patch your system, especially your SQL server.

5. Remove all the dead SQL or other codes that you don't use
Database servers are complex beasts and they have much more functionality than you need. As far as security is concerned, more is never better. For instance, the xp_cmdshell extended stored procedure in MS SQL gives access to the shell and this is just what a hacker dreams of. This is why you should disable this procedure and any other functionality, which can easily be misused. Just remove or at least disable any functionality you can do without.

6. Never display the system defined error message for SQL errors
Error messages are useful to an attacker because they give additional information about the database and SQL queries. And all SQL attacks are usually based on type of error issued by SQL means type of error decides the hackers approach for hacking the website or application. A better solution that does not compromise security would be to display a generic error message that simply states an error has occurred with a unique ID. The unique ID means nothing to the user, but it will be logged along with the actual error diagnostics on the server which the technical support team has access to. This will protect your system even if SQL throws errors, hackers will never came to know that what error occurred. So play safe to enjoy safe.

7. Store database credentials in a separate file
In order to minimize the damage in case of an SQL injection attack, always store database credentials in a separate encrypted file. Now even if a hacker manages to break in, he or she won’t benefit much as he cannot do much in your database.
8. Use the principle of least privilege
The principle of least privilege is highly beneficial and it applies to SQL injections as well. Always think or check twice about what privileges you are providing to user or object. Suppose you wan to provide moderator access to some user, so only provide him the access of those tables which he/she need, rather than proving him the access of whole database. If you have to provide access to a system, its better to create partitioned table spaces inside database and provide access only to specific table space. This technique will drastically reduce the attack surface.

9. Disable Shells
Many databases offer shell access to the database which essentially is what an attacker or hacker needs. Because of this you need to close this open loophole. Every service provider has different method to disable the execution of shells on their database. So consult your Database documentation about how to disable shell access for your particular database or table space or particular table.

10. Use SQL injection Hack tools to check vulnerabilities 
Last but not the least, think like hacker. How a hacker can hack my database through SQL injection, what tools and techniques he can use to find the loopholes. You should always have a dry run of SQL injection hack tools like SQLi, Haviz, SQL injectme etc.  More if you can afford retina vulnerability scanner then its too good. As it consists of all latest exposed vulnerabilities.


HACKING BSNL BROADBAND INTERNET SPEED

Posted by: Abhishek anand

BSNL Internet is most famous Internet Broadband connection service in India. Its not only due to its ready availability but mainly because of it's somewhat cost-effectiveness. But, even though, many BSNL Broadband and BSNL Cellone Dataone users are frustrated with BSNL Internet speed as they never get speed that BSNL has promised to them and BSNL broadband connection breaks after every minutes because of line errors.  So today i am going to share with you the latest hacks that you can use toincrease BSNL broadband connection speed and avoid regular disconnection and line losses.


BSNL broadband hacks to increase connection speed

INCREASE BSNL BROADBAND CONNECTION SPEED:

To increase BSNL broadband speed, just follow these 4 BSNL hacks  mentioned below:

1. Change BSNL DNS servers:

The main reason for slow BSNL Broadband connection speed is slow BSNL DNS servers. So, we can increase BSNL Broadband connection speed by changing default BSNL DNS servers to fast BSNL DNS servers, which can help us to increase BSNL broadband connection speed. Using public DNS servers improves speed, as BSNL has lot of users and all using the same DNS servers. So during peak time the DNS reacts very slow and takes a lot of time to translate the host address to numerical value, called IP address that your network used to connect to website.
Use these DNS servers for best speed:


208.67.222.222
208.67.220.220 

2. Use Adblock Plus:

The best way to increase BSNL Broadband connection speed is to block flash and other unwanted ad material on webpage, so that page loads faster, thus make BSNL Broadband apparently fast.AdBlockPlus is a firefox addon used to block flash content of page, thus helping you to increase BSNL Broadband connection speed. This has a lot of effect as it blocks unwanted advertisements and popups thus making your internet browsing experience even better.
     

3. Using TCPOptimizer:

This is another software used to optimize your TCP/IP connection settings. TCP/IP determines the maximum transfer Unit(MTU) for your device. The maximum data that your connection can send or receive per packet. Best MTU setting for BSNL broadband is 1492 ( by default its 1500 that causes an extra load on your broadband connection that why disconnections occur as you are forcing your device for doing something that it is not capable off, so optimise your TCP/IP settings). You can use TCP Optimizer your BSNL network settings. Install TCPOptimizer.
     

4. Reducing cache space:

Reduced Cache space can be used to increase BSNL Broadband speed. You can do this as:
For Internet Explorer : Tools - Internet Options - Browsing History - Settings - Disk space to use and reduce disk space value to "50".
For Firefox: Tools - Options - Advanced - Network and look for cache space. Change value to 50.


These are some BSNL hacks to increase BSNL internet broadband connection speed. Just give them a try and check out whether it works for you to increase BSNL internet speed. If you have any other BSNL hack to increase BSNL broadband speed, please mention it in comments. 


HOW TO FIX OR REPAIR CORRUPT FILES IN WINDOWS
Posted By: Abhishek anand
Hello Friends, first of all welcome to my new website Hacking Loops to learn hacking and securing yourself online from hackers and unwanted malicious viruses and Trojans. So in my very first post on Hacking Loops, i will explain you how to fix or repair corrupt files in windows XP, vista and windows 7 too.


How to fix or repair corrupt file error in window

Most of times, we face problem of corrupt file and unwanted error messages pops up after regular intervals which frustrates the user a lot. Many users thinks that antivirus will fix all the things but that's not the truth. Antivirus just removes the viruses from your system but it did not return back you the original files so virus problems might be fixed but error messages keep on popping. There are two methods to fixed or repair corrupt files in windows:
1. Format your PC and install everything fresh.
2. Without format.

First method is absolutely cheap as anyone can do that so i will not explain that. Now as we are hackers and always looking for hacking the security loop or vulnerabilities. But here there is no need to do that, what we have to do just use the existing windows command technique. Its a two step procedure.

Requirement:
Windows Operating System CD.

Steps to fix or repair Corrupt files in Windows without formatting:
1. First of all Scan your system with your updated antivirus thoroughly and ensure that all viruses and malwares are removed according to antivirus.
2. Now after scanning system, the only problem remains is corrupted files pop up messages that come because their dynamic linking has been modified by virus or due to some file deletion issues.
3. Now place your WINDOWS CD into CD/DVD drive.
4. After putting your CD. Go to Start and then open RUN.
5. Now type the following command into RUN text field.

'sfc /scannow'

 without quotes and press enter.
6. Now it will load all your windows file and fix all your corrupted files.

That's all....try this trick..


HACKING PAID ANDROID APPS AND DOWNLOAD FREE

Posted By: Abhishek Anand


Hello friends, today i am going to share with you how to hack android paid applications anddownload them absolutely free. By using these tricks and loopholes in android, you will able todownload unlimited android applications and that all absolutely free. Some applications are still not there but you can put a request below and we will try to provide you. This hacking and downloading paid android application involves basic android market that's even only for searching new application names. Basically its not a hack, its just a trick or simply you call it a discovering facts to make our working easier and cheaper.






Requirements for Hacking Android applications:
2. Mobile or Iphone should have internet access(optional as i will tell you better alternate way. Why to waste lot of money and data usage on 3G. Use your broadband to download it).
Learn how to maximize or boost battery backup in android phones

3. Phone connectivity to PC or laptop through USB.

How i got idea behind this hack?
Normally i use 4shared website to find ebooks and other software's. Yesterday i have download Temple run on my Samsung Galaxy (android 2.2) and started playing it, as soon as i finished the first level the game has started asking me for purchasing full version. So i started searching on Google to get its full version, but another lol thing happened i founded its full version but we cannot install anything on our mobile from our PC or PC suite(KIES in case of Samsung). So after thinking alot i reached a solution that why should not i copy the installer of it onto my memory card of my phone and then try to install it. And guess what happened, it got installed and i really enjoyed full game.

Complete Steps to Hack and download paid android apps for free:
1. First of all select which paid android application you want to hack and install its full version for free. I am explaining this article with the help of paid android applicationTemple run.
2. Now go to below page and type your android application name then space and then apk in the search box and click on search.
hacking paid android applications free
Place where you will find full version of paid android applications
Below is practical example shown how to search on it:


 Download latest version and save it to your PC.

3. Now Connect your mobile to your PC through USB and transfer this .apk file to your memory card or simply storage of your android phone.

4. Now run the installer and install it. Let the installation complete and then enjoy the full paid application.
Note: When you try this trick first time you mobile will show a warning message something like Do you want to allow third party applications, just select yes and continue the installation. If it still doesn't allow then Go to Settings then to Applications  and there you will find Unkown Sources(allow installation from non market applications) like something, just click it to enable it and continue installation.
5. That's all.... Isn't that easy and cool...:P



Note: ALL applications might not be available on 4shared, so please don't comment like n00bs that it doesn't work. This 100% working technique and i have tested more than 100 of applications using this trick.

I hope you all have liked my tutorial, don't forget to say thanks.
If you have any queries and doubts feel free to ask in form of comments..

Wednesday, 4 June 2014

EMAIL PASSWORD HACKING

Posted By: Abhishek Anand


I constantly get emails of people asking me how to hack hotmail, hack yahoo, and all the other popular email services. Usually it’s for one of the following moronic cover-ups: It’s my password, I just forgot it. , or my boyfriend this or my girlfriend that. I just don’t understand what possesses them to possibly think that I give a hoot. Nah, I love you guys, I’m just kidding! Everyone seems to think that there’s some hacking trick that will magically get them the password. Too bad you have to actually learn something. Bummer… eh? Below I have briefly described the most common methods.


Phishing - Phishing is by far the most used and easiest method. The attacker simply sets up a page that looks exactly like the real email login page and tricks people into entering their login information.
Update: Check out the new post on how to create your own phishing page here.


Malware - Attackers can infect computers with malware such as Trojan horses that could extract all the saved passwords on a computer or a key logger that will log all the victims typed passwords.


Guessing - The attacker could literally guess the password if the victim uses an easy password like his/her name, birthday, favorite something, pets name, or something similar. If the attacker knows the victim well enough this attack won’t be that difficult to carry out.


Social Engineering - The attacker could literally ask for your password by calling up the victim and pretending to be an IT employee of the company. Once the victims trust is gained, the attacker would then make up a story saying something like the victims password is needed to do some updates because the user database is down or some other bogus. The attacker could also use social engineering along with a phishing page. This would be done by sending the victim a n email that looks like it is from the real email provider. In the email would be a link to his phishing page telling the victim that he/she needs to login and update or change some information immediately for whatever reason.

Real Hacking Stuff
DISCLAIMER: THIS IS PURELY FOR EDUCATIONAL PURPOSE.


Beware!!
Never Fall into the False Trap !!

Thats right Guys . Well according to my Personal experience when i initially started acquiring Skills in real HACKING , 18 out of 20 Searches and links Claimed easy breaking into Hotmail, Yahoo, Rediffmail, Myspace, Facebook etc. But In Fact you land up in :


"Hacking into your own Account."


The most Common type of trap some Novice HACKERS try to trick is somewhat like this:


Step-by-step Yahoo hacking!!! So many have been victimized by this, sending their passwords and hoping that they can retrieved a targeted account by following these:
It goes this way:


*******

Log in to your own yahoo/Hotmail or any other E-Mail account. Compose an e-mail to: eg: recoversecretcode@yahoo.com. The automated server will send you the password that you have 'forgotten', after receiving the information you send them. STEP 3- In the subject line type exactly: password retrieve...etc, etc...

*******



Don't ever fall into this !!!!!!!



It's a real scam. The only way to recover your password is going to your site and authenticate from there.

You will be asked for "secret questions" which you have filled during your sign-up. Thereafter the original passwords will be emailed to your alternate email account, which also you have provided during sign-up. It is very important to keep those "sign-up" information for your future use.

Some are earning so much money on this scam. They will ask you to send money, before they start the process. After receiving the payment, they're gone.

If there is a great need for you to crack or retrieved someone's email password, there are some who can provide it to you, choose the best, someone who will send you proofs such as screen shots, sent items or address book before they ask for payment.

But its all False. Do Slap these articles by commenting them where ever you find them.


But here on this blog I can Guarantee you Pure Genuine Gold Stuff.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Popular Posts